<!DOCTYPE HTML>
<html>

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
  <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
  <title>华富</title>
  <link rel="stylesheet" type="text/css" href="../../css/api.css"/>
  <link rel="stylesheet" type="text/css" href="../../css/common.css" />
  <link rel="stylesheet" type="text/css" href="../../css/aui.css" />
  <link rel="stylesheet" type="text/css" href="../../css/aui-pull-refresh.css" />
  <link rel="stylesheet" type="text/css" href="../../css/swiper.min.css"/>
  <link rel="stylesheet" type="text/css" href="../../css/style.css"/>
    <style>
        html,
        body {
            background-color: transparent !important;
        }
        #swiper_banner .swiper-pagination {
            background: rgba(0, 0, 0, 0.4);
            display: inline-block;
            color: #fff;
            width: 2.4rem;
            font-size: 0.6rem;
            border-radius: 1rem;
            right: 0.75rem;
            left: inherit;
        }

        #swiper_banner .swiper-pagination-current {
            font-size: 0.8rem;
            color: #fff;
        }

        #swiper_banner .swiper-pagination-total {
            color: #fff;
        }
        #swiper_banner .swiper-slide {
            height: 9rem;
        }
        .contentHead {
          padding: 1.5rem 1.3rem;
          background-color: #fff;
          margin-bottom: 0.5rem;
          position: relative;
        }
        .contentHead .class_share{
          position: absolute;
          top:0;
          right:0;
        }
        .contentRMB {
          color: #333333;
          font-size: 1.7rem;
          font-weight: bold;
          line-height: 1;
        }
        .contentRMB span{
          font-size: 2.3rem;
          line-height: 1.75rem;
          font-weight: bold;
        }
        .contentRMB span.cuxiao{
          font-size: 0.9rem;
          color: #ed6a20;
          background-color: #ffeae1;
          border-radius: 0.6rem;
          line-height: 1;
          vertical-align: middle;
          padding: 0.25rem 0.4rem;
        }
        .contentHead > .contentTitle {
          font-size: 1.5rem;
          color: #333;
          margin: 1.5rem 0 0;
          line-height: 2rem;
          /*width:78%;*/
          padding-right:22%;
          font-weight: bold;
          position: relative;
        }
        .contentHead > .contentTitle span{
          font-size:1.2rem;
          color:#fff;
          line-height: 1;
          background: #ed6a20;
          padding:0.2rem 0.35rem;
          border-radius: 0.2rem;
          margin-right:0.6rem;
        }
        .contentHead > .contentTitle .class_share{
          position: absolute;
          top:0;
          right:0;
        }
        .contentHead > .contentTitle .class_share img{
          width:2rem;
          margin:0 auto;
        }
        .contentHead > .contentTitle .class_share span{
          font-size: 1.1rem;
        	font-weight: normal;
        	font-stretch: normal;
        	letter-spacing: 0rem;
        	color: #666666;
          background:#fff;
          margin-right: 0;
          padding:0;
        }
        .contentLAB{
          font-size:1.3rem;
          line-height: 1;
          color:#ed6a20;
          margin-top:1.1rem;
        }
        .contentHead_bot {
          border-top:1rem solid #f2f2f2;
          border-bottom:1rem solid #f2f2f2;
          padding:1.4rem 1.3rem;
        }
        .contentHead_bot {
          display: -webkit-box;
          display: -webkit-flex;
          display: flex;
          -webkit-box-orient: vertical;
          box-orient: vertical;
          -webkit-box-pack: justify;
          -webkit-justify-content: space-between;
          justify-content: space-between;
          -webkit-box-align: start;
          -webkit-align-items: flex-start;
          align-items: flex-start;
          font-size: 1.3rem;
          color: #999;
          line-height: 1;
        }
        .contentHead_bot div{
          color:#999;
          font-size: 1.3rem;
        }
        .content_ul {
          padding: 0 1.3rem;
          background-color: #fff;
          border-bottom: 1rem solid #f2f2f2;
        }
        .content_ul li {
          padding: 1.55rem 0;
          border-bottom: 1px solid #e5e5e5;
          position: relative;
        }
        .content_ul li:after {
          content: '';
          display: block;
          clear: both;
        }
        .content_ul li:last-of-type {
          border-bottom: none;
        }
        .content_ulLeft {
          /*width:2rem;*/
          font-size: 1.3rem;
          color: #999;
          float: left;
          line-height: 1.7rem;
        }
        .content_con {
          color: #999;
          font-size: 1.3rem;
          line-height: 1.7rem;
          float: left;
          width: calc(100% - 7rem);
          display: -webkit-box;
          -webkit-box-orient: vertical;
          -webkit-line-clamp: 1;
          overflow: hidden;
          margin-left: 0.5rem;
          text-overflow: ellipsis;
        }
        .content_Right {
          float: right;
          /*width: 0.5rem;*/
          font-size: 1.0rem;
          vertical-align: middle;
        }
        .content_Right i{
          font-size: 0.9rem;
        }

        .content_foot {
          padding: 1.5rem 1.3rem 2rem;
          background-color: #fff;
          border-bottom: 1rem solid #f2f2f2;
        }
        .content_foot:after,.footer:after {
          content: '';
          display: block;
          clear: both;
        }
        .content_footImg {
          width: 5rem;
          height: 5rem;
          margin-right: 1rem;
          border: 1px solid #e5e5e5;
          float: left;
        }
        .content_footTxt {
          height: 5rem;
          width: calc(100% - 6rem);
          float: left;
          display: flex;
          flex-direction: column;
          justify-content: space-around;
        }
        .content_footTxt h4 {
          font-size: 1.5rem;
          line-height: 1;
          color: #000000;
          letter-spacing: 0.03rem;
          display: -webkit-box;
          -webkit-box-orient: vertical;
          -webkit-line-clamp: 1;
          overflow: hidden;
          text-overflow: ellipsis;
        }
        .content_footTxt p {
          font-size: 1.3rem;
          line-height: 1;
          color: #666666;
          display: -webkit-box;
          -webkit-box-orient: vertical;
          -webkit-line-clamp: 1;
          overflow: hidden;
          text-overflow: ellipsis;
        }

        .footer {
          height: 4.8rem;
          position: fixed;
          bottom: 0;
          left: 0;
          width: 100%;
          background-color: #fff;
          box-shadow: 0px 0px 1rem 0px rgba(0,0,0,0.05)
        }
        .footer_left {
          height: 100%;
          float: left;
          width: 45%;
          padding: 0.85rem 0;
        }
        .footer_left > div {
          width: 33.333%;
          float: left;
          height: 100%;
          color: #000000;
          font-size: 1rem;
          line-height: 1;
          text-align: center;
          display: flex;
          flex-direction: column;
          justify-content: center;
          border-right: 1px solid rgba(0,0,0,0.15);
        }
        .footer_left > div:last-of-type {
          border-right: none;
        }
        .footer_left > div > img {
          height:1.7rem;
          margin: 0 auto 0.35rem;
        }
        .footer_right {
          height: 100%;
          float: left;
          width: 55%;
        }
        .footer_rightL,.footer_rightR {
          width: 50%;
          height: 100%;
          float: left;
          text-align: center;
          overflow: hidden;
        }
        .footer_rightL {
          background-image: linear-gradient(-90deg,#ff9501 0%,#ffb001 48%,#ffca00 100%),linear-gradient(90deg,#79c735 0%,#65a032 100%);
          background-blend-mode: normal,normal;
          color: #fff;
          font-size: 1.6rem;
          line-height: 4.8rem;
        }
        .footer_rightR {
          background-image: linear-gradient(-90deg,
      		#ff4e18 0%,
      		#f9280d 52%,
      		#f20101 100%),
      	linear-gradient(
      		#ff8600,
      		#ff8600);
      	background-blend-mode: normal,
      		normal;
          color: #fff;
          font-size: 1.6rem;
          line-height: 4.8rem;
        }
        /**pingjia**/
        .content_pinglun{
          padding: 0 1.3rem 2rem;
          border-bottom: 1rem solid #f2f2f2;
        }
        .content_pinglun_title{
          padding:1.4rem 0;
          border-bottom: 1px solid #e5e5e5;
        }
        .fl{
          float:left;
        }
        .fr{
          float:right;
        }
        .content_pinglun_title span.left{
          font-size:1.4rem;
          line-height: 1;
          color:#000;
        }
        .content_pinglun_title span.right{
          font-size:1.4rem;
          line-height: 1;
          color:#ed6a20;
        }
        .content_pinglun .aui-list-item-media{
          width:3rem;
        }
        .content_pinglun .aui-list-item-arrow{
          font-size:1.4rem;
          color:#000000;
          line-height: 3rem;
          padding-left:1.15rem;
          padding-right:0;
        }
        .content_pinglun>ul>li{
          padding:1.55rem 0 1rem;
          border-bottom: 1px solid #e5e5e5;
        }
        .content_pinglun>ul>li:last-child{
          border-bottom: none;
        }
        .content_pinglun_img{
          margin-top:1rem;
        }
        .content_pinglun_img ul{
          margin-right:-0.25rem;
          margin-left:-0.25rem;
        }
        .content_pinglun_img ul li{
          width:33.3333%;
          float:left;
          padding-left:0.25rem;
          padding-right:0.25rem;
        }
        .content_pinglun_content{
          font-size:1.3rem;
          color:#000000;
          line-height: 1.75rem;
	        letter-spacing: 0.02rem;
          margin-top: 1rem;
        }
        .content_pinglun_bot_left{
          font-size:1.3rem;
          line-height: 1;
          color:#666666;
          margin-top:0.9rem;
        }
        .content_pinglun_bot_right1{
          display: inline-block;
          margin-left:1.5rem;
          margin-top:0.6rem;
        }
        .content_pinglun_bot_right1 img{
          display: inline-block;
          vertical-align: middle;
        }
        .content_pinglun_bot_right1 span{
          display: inline-block;
          vertical-align: middle;
          font-size:1.3rem;
          color:#000000;
          opacity: 0.6;
          line-height: 1;
          margin-left:0.8rem;
        }
        .content_pinglun_bot_right2 img{
          width: 1.55rem;
        }
        .content_pinglun_bot_right3 img{
          width: 1.2rem;
        }
        .content_pinglun_more{
          width:100%;
          height:3rem;
          line-height: 3rem;
          font-size: 1.3rem;
        	font-weight: normal;
        	font-stretch: normal;
        	letter-spacing: 0.03rem;
        	color: #333333;
          text-align: center;
          border-radius: 0.5rem;
        	border: solid 0.05rem #7d7d7d;
        	opacity: 0.73;
        }
        .content_foot2{
          margin-top:1.4rem;
        }
        .content_foot2 ul li{
          float:left;
          width:33.33%;
          text-align: center;
          position: relative;
          /*border-right: 0.05rem solid #e5e5e5;*/
        }
        .content_foot2 ul li::after{
          content:'';
          position: absolute;
          width:1px;
          height:70%;
          top:15%;
          right:0;
          background:#eee;
        }
        .content_foot2 ul li:last-child::after{
          height:0;
        }
        .content_foot2 ul li h5{
          font-size: 1.6rem;
        	font-weight: normal;
        	font-stretch: normal;
        	letter-spacing: 0.03rem;
        	color: #000000;
          line-height: 1;
        }
        .content_foot2 ul li p{
          font-size: 1.3rem;
          line-height: 1;
        	font-weight: normal;
        	font-stretch: normal;
        	letter-spacing: 0.03rem;
        	color: #666666;
          margin-top:1.5rem;
        }
        .content_foot3{
          margin-top:1.5rem;
        }
        .content_foot3_img{
          width:calc(100% - 11rem);
          height:10rem;
          background:url(../../image/class/class_detail_shop1.jpg) center center/cover no-repeat;
          float:left;
        }
        .content_foot3_txt{
          float:left;
          width:10.5rem;
          margin-left:0.5rem;
          height:10rem;
          display: flex;
          flex-direction: column;;
          justify-content: space-between;
        }
        .content_foot3_txt p{
          display: block;
          width:100%;
          height: 3rem;
          line-height: 3rem;
          color:#333333;
          font-size:1.2rem;
          text-align: center;
        	background-color: #f8f8f8;
        	border-radius: 0.3rem;
        }
        .content_foot4{
          margin-top:1.7rem;
          height:3rem;
        }
        .content_foot4_btn{
          width:48%;
          height:3rem;
          border-radius: 0.25rem;
        	border: solid 0.05rem rgba(0,0,0,0.3);
        	/*opacity: 0.3;*/
          text-align: center;
          display: flex;
          align-items: center;
          justify-content: center;
        }
        .content_foot4_btn img{
          display: inline-block;
          width:1.5rem;
          vertical-align: middle;
        }
        .content_foot4_btn span{
          display: inline-block;
          vertical-align: middle;
          font-size:1.4rem;
          color:#4c4c4c;
          line-height: 1;
          margin-left:0.75rem;
        }
        .content_details_title{
          padding:1.3rem;
          line-height: 1;
          font-size:1.4rem;
          color:#000000;
        }
        .content_details_title span{
          color:#cecece;
          margin-left:0.75rem;
        }
        .content_details_img{
          margin-bottom: 4.8rem;
        }
        .content_details_img1{
          margin-bottom: 1rem;
        }
        .detail_pingjia_f1_start{
          display: inline-block;
          width:1rem;
          height:1rem;
          background:url(../../image/class/start1.png) center center/cover no-repeat;
        }
        .detail_pingjia_f1_start1{
          display: inline-block;
          width:1rem;
          height:1rem;
          background:url(../../image/class/start.png) center center/cover no-repeat;
        }
        .pingjia_name{
          width:calc(100% - 11rem);
        }
        .pingjia_star{
          width:8rem;
        }

        /**商品参数**/
        .detail_canshu{
          position: fixed;
          width:100%;
          height: 100%;
          top:0;
          left:0;
          z-index: 8;
        }
        .detail_canshu_bg{
           position: fixed;
           width:100%;
           height: 100%;
           background:#333;
           opacity: 0.6;
           top:0;
           left:0;
           z-index: 10;
        }
        .detail_canshu_con{
          position: absolute;
          bottom:0;
          left:0;
          width:100%;
          z-index: 11;
          background:#fff;
          padding:2.4rem 1.3rem 1.5rem;
          border-radius: 1rem 1rem 0 0;
        }
        .detail_canshu_con_title{
          font-size:1.6rem;
          color:#555555;
          line-height: 1;
          text-align: center;
        }
        .detail_canshu_con_list ul li{
          padding:1.7rem 0;
          border-bottom: 1px solid #e5e5e5;
          position: relative;
          /*font-size:1.4rem;
          color:#333333;
          line-height: 1;*/
        }
        .detail_canshu_con_list ul li:last-child{
          border-bottom: none;
        }
        .detail_canshu_con_list ul li span.title{
          display: inline-block;
          font-size:1.4rem;
          color:#999999;
          line-height: 1;
          width:5.65rem;
          vertical-align: middle;
          line-height: 1.65rem;
        }
        .detail_canshu_con_list ul li span.txt{
          display: inline-block;
          font-size:1.4rem;
          color:#333333;
          line-height: 1;
          margin-left:3rem;
          vertical-align: middle;
        }
        .detail_canshu_con_btn{
          width:100%;
          height: 4rem;
        	background-color: #ed6a20;
        	border-radius: 1.98rem;
          color:#fff;
          text-align: center;
          line-height: 4rem;
          font-size:1.6rem;
          margin-top:1.7rem;
        }
        /**商品参数**/

        /**商品尺寸**/
        .detail_size_con{
          position: absolute;
          width:100%;
          height:46rem;
          overflow: auto;
          background: #fff;
          border-radius: 1rem 1rem 0 0;
          bottom: 0;
          left: 0;
          z-index: 11;
        }
        .detail_size_con1{
          width:100%;
          padding:1.5rem;
        }
        .detail_size_con_f1_left{
          width:10rem;
          height:10rem;
          float:left;
        }
        .detail_size_con_f1_right{
          width:calc(100% - 11.5rem);
          margin-left:1.5rem;
          height:10rem;
          display: flex;
          flex-direction: column;
          justify-content: center;
          float:left;
        }
        .detail_size_con_f1_right1{
          font-size:1.3rem;
          color:#ed6a20;
          letter-spacing: 0.03rem;
        }
        .detail_size_con_f1_right1 span{
          font-size:1.6rem;
          color:#ed6a20;
          letter-spacing: 0.03rem;
          line-height: 1;
        }
        .detail_size_con_f1_right2{
          font-size:1.2rem;
          color:#333333;
          line-height: 1;
          margin-top:1.3rem;
        }
        .detail_size_con_f1_right3{
          font-size:1.2rem;
          color:#333333;
          line-height: 1;
          margin-top:1.3rem;
        }
        .detail_size_con_f2{
          margin-top:2rem;
        }
        .detail_size_con_f2_title{
           font-size:1.3rem;
           color:#333;
           line-height: 1;
           margin-bottom: 0.9rem;
        }
        .detail_size_con_f2_label span{
          min-width: 7.2rem;
          /*height:2.8rem;*/
          font-size:1.2rem;
          color:#333333;
          line-height: 1;
          text-align: center;
          padding:1rem;
          background-color: #eeeeee;
	        border-radius: 1.4rem;
          margin-bottom: 1.5rem;
          margin-right:1.2rem;
        }
        .detail_size_con_f2_label span.active{
          background-color: #ed6a20;
	        color:#fff;
        }
        .detail_size_con_num{
          margin-top:1.7rem;
        }
        .detail_size_con_num1{
          font-size:1.3rem;
          color:#333;
          line-height: 1;
        }
        .detail_size_con_num2 span{
          font-size: 1.5rem;
          margin: 0 0.2rem;
        }
        .detail_size_con_num2 input{
          display: inline-block;
          width: 3.6rem;
        	height: 2.1rem;
        	background-color: #f6f6f6;
          text-align: center;
          line-height: 2.1rem;
          border:none;
          font-size:1.3rem;
          color:#333;
        }
        .detail_size_con_btn{
          position: fixed;
          z-index: 12;
          bottom:0;
          left:0;
          width:100%;
          height:4.8rem;
          line-height: 4.8rem;
          text-align: center;
          color:#ffffff;
          font-size:1.5rem;
          background-image: linear-gradient(-90deg,
        		#ff4e18 0%,
        		#f9280d 52%,
        		#f20101 100%),
        	linear-gradient(
        		#f82706,
        		#f82706);
        	background-blend-mode: normal,
        		normal;
        }
        .detail_size_con_close{
          width:2rem;
          height:2rem;
          position: absolute;
          top:1.5rem;
          right:1.5rem;
        }
        /**商品尺寸**/
        [v-cloak] {
            display: none;
        }

    </style>
</head>

<body>
  <div class="box" id="app" v-cloak>

    <div class="detail_canshu">
      <div class="detail_canshu_bg" onclick="closeFR()"></div>
      <div class="detail_size_con">
        <div class="detail_size_con1">
          <div class="detail_size_con_f1 clearfix">
            <div class="detail_size_con_f1_left">
              <img :src="goods_ps_cont.img" alt="" width="100%">
            </div>
            <div class="detail_size_con_f1_right">
              <div class="detail_size_con_f1_right1">￥<span>{{goods_ps_cont.price}}</span>.00</div>
              <div class="detail_size_con_f1_right2">快递：免邮</div>
              <div class="detail_size_con_f1_right3 clearfix">
                <span class="fl">已选：{{goods_ps_cont.sku_info}}</span>
                <span class="fr">配送至：西湖区</span>
              </div>
            </div>
          </div>
          <div class="detail_size_con_f2">
            <ul>
              <li v-for="items4 in goodsSkuInfo">
                <div class="detail_size_con_f2_title">{{items4.name}}</div>
                <div class="detail_size_con_f2_label">
                  <span v-for="(items5,index) in items4.sku_label" :data-pid="items5.sku_id" :class="index==0?'active':''">{{items5.name}}</span>
                </div>
              </li>
            </ul>
            <div class="detail_size_con_num clearfix">
              <div class="detail_size_con_num1 fl">购买数量</div>
              <div class="detail_size_con_num2 fr">
                <span>- </span>
                <input type="text" v-model="num">
                <span> +</span>
              </div>
            </div>
          </div>
        </div>
        <div class="detail_size_con_close" onclick="closeFR()">
          <img src="../../image/class/class_detail_size2.png" alt="" width="100%">
        </div>
      </div>
      <div class="detail_size_con_btn Submit">加入购物车</div>
    </div>

  </div>
</body>
<script type="text/javascript" src="../../script/api.js"></script>
<!-- <script type="text/javascript" src="../../script/zepto.js"></script> -->
<script type="text/javascript" src="../../script/jquery.min.js"></script>
<script type="text/javascript" src="../../script/vue.min.js"></script>
<script type="text/javascript" src="../../script/utils.js"></script>
<script type="text/javascript" src="../../script/common.js"></script>
<script type="text/javascript" src="../../script/aui-scroll.js"></script>
<script type="text/javascript" src="../../script/aui-pull-refresh.js"></script>
<script type="text/javascript" src="../../script/aui-tab.js"></script>
<script type="text/javascript" src="../../script/swiper.min.js"></script>
<script type="text/javascript" src="../../script/axios.min.js"></script>
<script type="text/javascript" src="../../script/axios-config.js"></script>
<script type="text/javascript">

    apiready = function() {

      var app = new Vue({
          el: '#app',
          data: {
            flag1:false,
            flag2:false,
            goodsId:api.pageParam.goodsId,
            goodsInfo:[],
            goodsInfoStore:[],
            goodsInfoComment:[],
            goodsSkuInfo:[],
            goods_ps:[],
            goods_ps1:[],
            goods_ps_cont:[],
            token:'',
            num:1
          },
          created: function() {
            // return;
            var $_this=this;
            api.showProgress({
                title: '努力加载中...',
                text: '先喝杯茶...',
                modal: false
            });

            // $_this.getDetail();
            $_this.getSkuList();
          },
          methods: {
            getSkuList:function(){
              var $_this=this;
              if(api.pageParam.goodsId){
                $_this.goodsId=api.pageParam.goodsId;
              }

              if($api.getStorage('token')){
                $_this.token=$api.getStorage('token');
              }

              const data = {
                 token:$_this.token,
                 goods_id:$_this.goodsId
              }
              Axios.post(window.Url.goods_skuinfo,data).then(function(res){
                if(res.status == 1){
                  // console.log(JSON.stringify(res.info))
                  // $_this.goodsSkuInfo=res.info;
                  $_this.goodsSkuInfo = res.info.sku;
                  $_this.goods_ps = res.info.sku_attr;
                  // $_this.goods_ps_cont = $_this.goods_ps[0];
                  // console.log(JSON.stringify($_this.goods_ps));
                  $_this.$nextTick(function () {
                     $('.Submit').click(function(){
                        $_this.goSubmit();
                     });

                    //  for (var key in res.info.sku_attr) {
                    //    console.log(key);
                    //    var attrId = '-' + $('.detail_size_con_f2_label span.active').data("pid") + '-';
                    //    console.log(attrId);
                    //     if (key==attrId) {
                    //       $_this.goods_ps_cont = res.info.sku_attr[key]
                    //     }
                    //   }
                      var objSel1=document.getElementsByClassName("active");
                      var arr1=[];
                      for(var i=0;i<objSel1.length;i++){
                          var str=$(objSel1[i]).data("pid");
                          arr1.push(str);
                      }
                      var t = '-';
                      arr1.map((r)=>{
                          t += r + '-';
                      })
                      var tid = t;
                      for(let j in $_this.goods_ps){
                          if(j == tid){
                              // console.log(JSON.stringify($_this.goods_ps[j]));
                              $_this.goods_ps_cont = $_this.goods_ps[j]
                          }
                      }
                      // console.log(JSON.stringify($_this.goods_ps_cont));

                      $('.detail_size_con_f2_label span').click(function () {
                            $(this).parent().find('span').removeClass('active');
                            $(this).addClass('active');

                            var objSel=document.getElementsByClassName("active");
                            var arr1=[];
                            for(var i=0;i<objSel.length;i++){
                                var str=$(objSel[i]).data("pid");
                                arr1.push(str);
                            }
                            var t = '-';
                            arr1.map((r)=>{
                                t += r + '-';
                            })
                            var tid = t;
                            for(let j in $_this.goods_ps){
                                if(j == tid){
                                    console.log(JSON.stringify($_this.goods_ps[j]));
                                    $_this.goods_ps_cont = $_this.goods_ps[j]
                                }
                            }

                      })

                  })
                }else{
                  api.toast({
                      msg:res,
                      duration: 2000,
                      location: 'bottom'
                  });
                }
              }).catch((err) => {
                api.alert({ msg: JSON.stringify(err) });
              })
            },
            goSubmit:function(){
              var $_this=this;
              // console.log(api.pageParam.type);
              // if(api.pa)
              if(api.pageParam.type == 1){
                const data = {
                   token:$_this.token,
                   goods_id:$_this.goodsId,
                   sku_id:$_this.goods_ps_cont.sku_id,
                   goods_nums:$_this.num
                }
                Axios.post(window.Url.add_cart,data).then(function(res){
                  if(res.status==1){
                    alert(res.info)
                  }else{
                    api.toast({
                        msg:res,
                        duration: 2000,
                        location: 'bottom'
                    });
                  }
                }).catch((err) => {
                  api.alert({ msg: JSON.stringify(err) });
                })
              }else if(api.pageParam.type == 2){
                api.openWin({
                    name: 'orderTrue',
                    url: '../cart/order_true.html',
                    pageParam: {
                        type: 1,
                        goods_id:$_this.goodsId,
                        sku_id:$_this.goods_ps_cont.sku_id,
                        goods_nums:$_this.num
                    }
                });
              }

            }
          },
          mounted: function () {
            api.hideProgress();
            // setRefresh();
          }
        })

    };

    //刷新
    function setRefresh(){
        var pullRefresh = new auiPullToRefresh({
            container: document.querySelector('.aui-refresh-content'),
            triggerDistance: 100
        }, function(ret) {

            if (ret.status == "success") {
                setTimeout(function() {
                    pullRefresh.cancelLoading(); //刷新成功后调用此方法隐藏
                }, 1500)
            }
        })
    }

    //打开客服页面
    function chatShow(){
      api.openWin({
          name: 'singleChatHeader',
          url: './single_chat_header.html',
          pageParam: {
              test:''
          }
      });
    }

    //打开店铺页面
    function shopShow(){
      api.openWin({
          name: 'shop',
          url: './shop.html',
          pageParam: {
              test:''
          }
      });
    }

    function setIframeHeight() {
        setTimeout(function(){
          var iframe_height = $("#cnt_iframe").contents().find("#content").height();
          $('#cnt_iframe').height(iframe_height+20);
        },500);
    };

    function closeFR(){
      api.closeFrame({

      });

    }

</script>

</html>
